package com.easyfeeling.test.service;

import com.easyfeeling.cache.annotation.LayeringCacheable;
import com.easyfeeling.test.entity.Provinces;
import org.springframework.stereotype.Service;

/**
 * 原始实现
 */
@Service("provincesService")
public class ProvincesServiceImpl implements ProvincesService {

    @LayeringCacheable(value = "order", key = "#key")
    @Override
    public Provinces detail(String provinceid) {
        Provinces provinces = null;
        System.out.println("数据库中得到数据--------"+System.currentTimeMillis());
        provinces = new Provinces();//provincesDao.detail(provinceid);
        if (null != provinces){
            provinces.setId(1);
            provinces.setProvince("beijing");
           // provinces.setCities(citiesDao.list(provinceid));
        }

        return provinces;
    }

    @Override
    public Provinces update(Provinces entity) {
        return entity;
    }

    @Override
    public Provinces add(Provinces entity) {
        return entity;
    }

    @Override
    public void delete(String provinceid) {
    }
}